package com.zxy.ziems.server.alarm.pojo.dto;

import com.zxy.ziems.server.alarm.pojo.vo.AlarmRuleRoleVO;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Null;
import lombok.Data;

import java.util.List;

/**
 * @Copyright (C),
 * @ClassName: AlarmRuleAddParam
 * @Author: yanzhiwei
 * @Description:
 * @Date: 2024/4/10 16:43
 */
@Data
public class AlarmRuleAddDTO {
    /**
     * 告警规则ID
     */
    @Null(message = "新增告警通知规则，ID必须为空", groups = AlarmRuleAddDTO.Add.class)
    @NotBlank(message = "告警通知规则ID不能为空", groups = {AlarmRuleAddDTO.Update.class, AlarmRuleAddDTO.Select.class})
    private String id;

    /**
     * 告警规则名称
     */
    @NotBlank(message = "告警通知规则名称不能为空", groups = {AlarmRuleAddDTO.Add.class})
    private String alarmRuleName;

    /**
     * 告警类型
     */
    @NotBlank(message = "告警通知规则告警方式不能为空", groups = {AlarmRuleAddDTO.Add.class})
    private String alarmType;

//    /**
//     * 告警角色
//     */
//    private List<String> alarmRoleIds;

    /**
     * 告警角色
     */
    List<AlarmRuleRoleVO> alarmRuleRoleVOList;

    /**
     * 适用范围
     */
    private List<AlarmRange> alarmRangeList;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 适用范围内部类
     */
    @Data
    public static class AlarmRange {
        /**
         * 设备类型ID
         */
        private String deviceTypeId;

        /**
         * 告警类型ID
         */
        private String alarmTypeId;

    }


    public interface Add {
    }

    public interface Update {
    }

    public interface Select {
    }
}
